Audrey & Nathan
6/14/19
offensive points made
expected points
defensive points made
expected defensive points
broken up two ways:
passing vs running plays
per attempt vs total across season
library(cowplot)##
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggthemes':
##
## theme_map
## The following object is masked from 'package:ggplot2':
##
## ggsave
library(magick)## Linking to ImageMagick 6.9.9.39
## Enabled features: cairo, fontconfig, freetype, lcms, pango, rsvg, webp
## Disabled features: fftw, ghostscript, x11
top_teams_by_year %>%
group_by(team, div_general) %>%
summarise(n = n()) %>%
mutate(n = factor(n, levels = 1:10)) %>%
ggplot(aes(x = n)) +
geom_bar(aes(fill = div_general)) +
scale_fill_manual(drop = F, values = c("red", "blue")) +
scale_x_discrete(drop=FALSE) +
# facet_wrap(~div_general) +
labs(title = "Finishes in the top 4 win/loss ratio from 2009-2018") +
theme_bw() -> plt
pltsv <- 0.09
jaguars <- "http://loodibee.com/wp-content/uploads/nfl-jacksonville-jaguars-team-logo-2-768x768.png"
chargers <- "http://loodibee.com/wp-content/uploads/nfl-los-angeles-chargers-team-logo-2-768x768.png"
jets <- "http://loodibee.com/wp-content/uploads/nfl-new-york-jets-team-logo-768x768.png"
raiders <- "http://loodibee.com/wp-content/uploads/nfl-oakland-raiders-team-logo-768x768.png"
ravens <- "http://loodibee.com/wp-content/uploads/nfl-baltimore-ravens-team-logo-2-768x768.png"
bengals <- "http://loodibee.com/wp-content/uploads/nfl-cincinnati-bengals-team-logo-768x768.png"
texans <- "http://loodibee.com/wp-content/uploads/nfl-houston-texans-team-logo-2-768x768.png"
x <- seq(from = -0.405, to = 0.6, by = 0.079)
ggdraw() +
draw_plot(plt) +
draw_image(jaguars, x = x[1], y = 0.27, scale = sv) +
draw_image(chargers, x = x[1], y = 0.13, scale = sv) +
draw_image(jets, x = x[1], y = -0.01, scale = sv) +
draw_image(raiders, x = x[1], y = -0.15, scale = sv) +
draw_image(chargers, x = x[1], y = -0.29, scale = sv) +
draw_image(ravens, x = x[2], y = -0.29, scale = sv) +
draw_image(bengals, x = x[3], y = -0.15, scale = sv) +
draw_image(texans, x = x[3], y = -0.29, scale = sv) +
draw_image(texans, x = x[4], y = -0.29, scale = sv) +
draw_image(texans, x = x[5], y = -0.29, scale = sv) +
draw_image(texans, x = x[6], y = -0.29, scale = sv) +
draw_image(texans, x = x[10], y = -0.29, scale = sv)top_teams_by_year %>%
group_by(team, div_general) %>%
summarise(n = n()) %>%
filter(div_general == "AFC") %>%
arrange(n)## # A tibble: 7 x 3
## # Groups: team [7]
## team div_general n
## <chr> <chr> <int>
## 1 CIN AFC 1
## 2 IND AFC 1
## 3 KC AFC 1
## 4 LAC AFC 1
## 5 PIT AFC 1
## 6 DEN AFC 4
## 7 NE AFC 6
Are the top teams consistently good?
How much variation is there between teams across the years?
Is the NFL competitive in terms of upset possibilities?
Can teams remain competitive with different passing/running strategies?
Does either passing or running dominate among the most competitive teams, or are play styles similar across all teams?
Are offense and defense equally important for a team to be competitive?
What separates the good teams from the bad teams?
There are very few teams that only have a good offense OR defense
Are the top teams consistently good?
How much variation is there between teams across the years?
Is the NFL competitive in terms of upset possibilities?
Only have data since 2009. Older data might look different.
In addition to win/loss, would have liked overall rank in season